Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[tutorial] Relay pass infra tutorial #4083

Merged
merged 5 commits into from
Nov 11, 2019
Merged

Conversation

zhiics
Copy link
Member

@zhiics zhiics commented Oct 8, 2019

Add a tutorial for the pass infra.

@billzorn
Copy link

billzorn commented Oct 18, 2019

Is there a tutorial for adding a new custom pass, completely in Python?

I think it would be useful to have some general, easy to find documentation on "working with the Relay IR / AST in Python." There are applications beyond just optimizing programs - I found while writing a tool to convert Relay to FPCore that working with the IR in Python was actually very convenient, but I had to have a Relay expert on hand to explain how to do it.

EDIT: More specifically, I had to have a Relay expert on hand to convince me that I could work with the IR in Python - after looking at the existing documentation, I had convinced myself that the only way to interact with it was to write c++.

@zhiics
Copy link
Member Author

zhiics commented Oct 27, 2019

@billzorn Sorry for the late response. I've been quite busy in the past several weeks. I will try to find some cycles next week to finish a version for this tutorial so that we can start reviewing.

I've covered an example in this tutorial about writing a customized pass in Python. You can probably take a look. Any feedback is highly appreciated.

@zhiics zhiics marked this pull request as ready for review October 28, 2019 23:55
@zhiics
Copy link
Member Author

zhiics commented Oct 28, 2019

@weberlo @slyubomirsky @billzorn @tqchen @wweic @yongwww @jroesch please review when you have time. Thanks.

tutorials/dev/relay_pass_infra.py Show resolved Hide resolved
tutorials/dev/relay_pass_infra.py Outdated Show resolved Hide resolved
tutorials/dev/relay_pass_infra.py Outdated Show resolved Hide resolved
@yzhliu yzhliu added the status: need update need update based on feedbacks label Nov 9, 2019
@yzhliu yzhliu merged commit cff62bd into apache:master Nov 11, 2019
@yzhliu
Copy link
Member

yzhliu commented Nov 11, 2019

Thanks @zhiics @billzorn @MarisaKirisame @yongwww

@yzhliu yzhliu added status: accepted and removed status: need update need update based on feedbacks labels Nov 11, 2019
@zhiics zhiics deleted the pass_tutorial branch November 11, 2019 06:14
zxy844288792 pushed a commit to neo-ai/tvm that referenced this pull request Nov 13, 2019
* Add pass manager tutorial

* fix some examples

* retrigger ci

* Update tutorials/dev/relay_pass_infra.py

Co-Authored-By: 雾雨魔理沙 <[email protected]>

* Add ToANormalForm link
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants